3.93 \(\int \tan ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx\)

Optimal. Leaf size=101 \[ \frac {2 i \sqrt {2} a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d} \]

[Out]

2*I*a^(3/2)*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2))*2^(1/2)/d-2*I*a*(a+I*a*tan(d*x+c))^(1/2)/d-2
/5*I*(a+I*a*tan(d*x+c))^(5/2)/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3543, 3478, 3480, 206} \[ \frac {2 i \sqrt {2} a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^2*(a + I*a*Tan[c + d*x])^(3/2),x]

[Out]

((2*I)*Sqrt[2]*a^(3/2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/d - ((2*I)*a*Sqrt[a + I*a*Tan[c
+ d*x]])/d - (((2*I)/5)*(a + I*a*Tan[c + d*x])^(5/2))/(a*d)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3478

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a + b*Tan[c + d*x])^(n - 1))/(d*(n - 1)
), x] + Dist[2*a, Int[(a + b*Tan[c + d*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && G
tQ[n, 1]

Rule 3480

Int[Sqrt[(a_) + (b_.)*tan[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[(-2*b)/d, Subst[Int[1/(2*a - x^2), x], x, Sq
rt[a + b*Tan[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0]

Rule 3543

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[
(d^2*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e + f*x])^m*Simp[c^2 - d^2 + 2*c*d*Tan[e
 + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] &&  !LeQ[m, -1] &&  !(EqQ[m, 2] && EqQ
[a, 0])

Rubi steps

\begin {align*} \int \tan ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx &=-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}-\int (a+i a \tan (c+d x))^{3/2} \, dx\\ &=-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d}-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}-(2 a) \int \sqrt {a+i a \tan (c+d x)} \, dx\\ &=-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d}-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}+\frac {\left (4 i a^2\right ) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d}\\ &=\frac {2 i \sqrt {2} a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 i a \sqrt {a+i a \tan (c+d x)}}{d}-\frac {2 i (a+i a \tan (c+d x))^{5/2}}{5 a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.39, size = 162, normalized size = 1.60 \[ \frac {a e^{-\frac {1}{2} i (2 c+3 d x)} \sqrt {1+e^{2 i (c+d x)}} \sqrt {\frac {a e^{2 i (c+d x)}}{1+e^{2 i (c+d x)}}} \left (\sin \left (\frac {d x}{2}\right )-i \cos \left (\frac {d x}{2}\right )\right ) \left (\sqrt {1+e^{2 i (c+d x)}} \sec ^3(c+d x) (2 i \sin (2 (c+d x))+7 \cos (2 (c+d x))+5)-20 \sinh ^{-1}\left (e^{i (c+d x)}\right )\right )}{5 \sqrt {2} d} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]^2*(a + I*a*Tan[c + d*x])^(3/2),x]

[Out]

(a*Sqrt[(a*E^((2*I)*(c + d*x)))/(1 + E^((2*I)*(c + d*x)))]*Sqrt[1 + E^((2*I)*(c + d*x))]*((-I)*Cos[(d*x)/2] +
Sin[(d*x)/2])*(-20*ArcSinh[E^(I*(c + d*x))] + Sqrt[1 + E^((2*I)*(c + d*x))]*Sec[c + d*x]^3*(5 + 7*Cos[2*(c + d
*x)] + (2*I)*Sin[2*(c + d*x)])))/(5*Sqrt[2]*d*E^((I/2)*(2*c + 3*d*x)))

________________________________________________________________________________________

fricas [B]  time = 0.45, size = 315, normalized size = 3.12 \[ -\frac {20 \, \sqrt {2} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {a^{3}}{d^{2}}} \log \left (\frac {4 \, {\left (a^{2} e^{\left (i \, d x + i \, c\right )} + {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {-\frac {a^{3}}{d^{2}}} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a}\right ) - 20 \, \sqrt {2} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {a^{3}}{d^{2}}} \log \left (\frac {4 \, {\left (a^{2} e^{\left (i \, d x + i \, c\right )} + {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {-\frac {a^{3}}{d^{2}}} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a}\right ) - \sqrt {2} {\left (-72 i \, a e^{\left (5 i \, d x + 5 i \, c\right )} - 80 i \, a e^{\left (3 i \, d x + 3 i \, c\right )} - 40 i \, a e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{20 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="fricas")

[Out]

-1/20*(20*sqrt(2)*(d*e^(4*I*d*x + 4*I*c) + 2*d*e^(2*I*d*x + 2*I*c) + d)*sqrt(-a^3/d^2)*log(4*(a^2*e^(I*d*x + I
*c) + (I*d*e^(2*I*d*x + 2*I*c) + I*d)*sqrt(-a^3/d^2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-I*d*x - I*c)/a) -
20*sqrt(2)*(d*e^(4*I*d*x + 4*I*c) + 2*d*e^(2*I*d*x + 2*I*c) + d)*sqrt(-a^3/d^2)*log(4*(a^2*e^(I*d*x + I*c) + (
-I*d*e^(2*I*d*x + 2*I*c) - I*d)*sqrt(-a^3/d^2)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-I*d*x - I*c)/a) - sqrt(2
)*(-72*I*a*e^(5*I*d*x + 5*I*c) - 80*I*a*e^(3*I*d*x + 3*I*c) - 40*I*a*e^(I*d*x + I*c))*sqrt(a/(e^(2*I*d*x + 2*I
*c) + 1)))/(d*e^(4*I*d*x + 4*I*c) + 2*d*e^(2*I*d*x + 2*I*c) + d)

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [A]  time = 0.16, size = 76, normalized size = 0.75 \[ -\frac {2 i \left (\frac {\left (a +i a \tan \left (d x +c \right )\right )^{\frac {5}{2}}}{5}+a^{2} \sqrt {a +i a \tan \left (d x +c \right )}-a^{\frac {5}{2}} \sqrt {2}\, \arctanh \left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )\right )}{d a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x)

[Out]

-2*I/d/a*(1/5*(a+I*a*tan(d*x+c))^(5/2)+a^2*(a+I*a*tan(d*x+c))^(1/2)-a^(5/2)*2^(1/2)*arctanh(1/2*(a+I*a*tan(d*x
+c))^(1/2)*2^(1/2)/a^(1/2)))

________________________________________________________________________________________

maxima [A]  time = 0.92, size = 102, normalized size = 1.01 \[ -\frac {i \, {\left (5 \, \sqrt {2} a^{\frac {9}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) + 2 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {5}{2}} a^{2} + 10 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} a^{4}\right )}}{5 \, a^{3} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="maxima")

[Out]

-1/5*I*(5*sqrt(2)*a^(9/2)*log(-(sqrt(2)*sqrt(a) - sqrt(I*a*tan(d*x + c) + a))/(sqrt(2)*sqrt(a) + sqrt(I*a*tan(
d*x + c) + a))) + 2*(I*a*tan(d*x + c) + a)^(5/2)*a^2 + 10*sqrt(I*a*tan(d*x + c) + a)*a^4)/(a^3*d)

________________________________________________________________________________________

mupad [B]  time = 0.30, size = 84, normalized size = 0.83 \[ -\frac {\frac {{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2}\,2{}\mathrm {i}}{5}-\sqrt {2}\,{\left (-a\right )}^{5/2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-a}}\right )\,2{}\mathrm {i}}{a\,d}-\frac {a\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,2{}\mathrm {i}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^2*(a + a*tan(c + d*x)*1i)^(3/2),x)

[Out]

- (((a + a*tan(c + d*x)*1i)^(5/2)*2i)/5 - 2^(1/2)*(-a)^(5/2)*atan((2^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2))/(2*(
-a)^(1/2)))*2i)/(a*d) - (a*(a + a*tan(c + d*x)*1i)^(1/2)*2i)/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {3}{2}} \tan ^{2}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**2*(a+I*a*tan(d*x+c))**(3/2),x)

[Out]

Integral((I*a*(tan(c + d*x) - I))**(3/2)*tan(c + d*x)**2, x)

________________________________________________________________________________________